// void, Obj This
Ship  this;
Building BS;
ObjList olBS;

Sleep(980+rand(GetConst("RandTimeStart"))+GetConst("AddTimeStart"));

this = This.AsShip();
//pr("shiptransport");
while(.IsValid){
	if(!.InHolder){
	        if(.UnitsCount <= 0){
	                
	                olBS = ClassPlayerObjs("BaseShipyard", .player).GetObjList();
	                if(olBS.count > 0){
	                        BS = olBS[0].AsBuilding;  
	                        
	                        .Deselect();
	                        .SetNoselectFlag(true);
	                        .SetCommand("enter", BS.settlement.GetCentralBuilding());
	                } else {
	                        .Damage(10000);
	                }
	        }
	}
        Sleep(3000);
}
return;
